package com.springboot.show_web.runner;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 设置SpringBoot开机启动，CommandLineRunner优先级低于ApplicationRunner
 * Created by yaosheng on 2019/12/1.
 * @Order:开机自启动优先级，数字越小优先级越高
 */
@Order(1)
@Slf4j
@Component
public class BootCommandLineRunner implements CommandLineRunner {

    @Override
    public void run(String... args) throws Exception {
        log.info("This is BootCommandLineRunner...");
    }
}